package com.zx.session;

import com.zx.dao.Configuration;
import com.zx.dao.MappedStatement;

import java.util.List;

/**
 * @ProjectName: myjdbc
 * @Package: com.zx.session
 * @ClassName: Executor
 * @Author: xzl
 * @Description: 执行者
 * @Date: 2021/9/6 18:59
 */
public interface Executor {

    /**
     * 查询数据
     * @param mappedStatement: mapper对象
     * @param params:          请求参数
     * @return: 结果
     */
    public <E> List<E> query(MappedStatement mappedStatement, Object... params) throws Exception;

    /**
     * 更新数据
     * @param mappedStatement: mapper对象
     * @param params:          请求参数
     * @return: 影响行数
     */
    public int update(MappedStatement mappedStatement, Object... params) throws Exception;
}
